package cn.buk.tms.dto;

import cn.buk.tms.entity.misc.CustomerTpCar;
import org.springframework.beans.BeanUtils;

/**
 * 用车政策
 * 企业客户的用车差旅政策
 * TP - Travel Policy
 */
public class CustomerTpCarDto extends BaseTpDto {

  private int vehicleGroupId;

  private String vehicleGroupName;

  private String remark;


  public static CustomerTpCarDto createdBy(CustomerTpCar tpCar) {
    CustomerTpCarDto dto = new CustomerTpCarDto();
    BeanUtils.copyProperties(tpCar, dto, "customerPosition");

    dto.setPositionId(tpCar.getCustomerPosition().getPositionId());
    dto.setPositionName(tpCar.getCustomerPosition().getName());
    dto.setPositionLevel(tpCar.getCustomerPosition().getVipLevel());

    dto.setVehicleGroupId(tpCar.getVehicleGroup().getId());
    dto.setVehicleGroupName(tpCar.getVehicleGroup().getName());

    return dto;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }

  public int getVehicleGroupId() {
    return vehicleGroupId;
  }

  public void setVehicleGroupId(int vehicleGroupId) {
    this.vehicleGroupId = vehicleGroupId;
  }

  public String getVehicleGroupName() {
    return vehicleGroupName;
  }

  public void setVehicleGroupName(String vehicleGroupName) {
    this.vehicleGroupName = vehicleGroupName;
  }
}
